import { createRouter, createWebHistory } from 'vue-router'


const router = createRouter({
    history: createWebHistory(import.meta.env.BASE_URL),
    routes: [
        {
            path: '/',
            name  : 'login',
            component: () => import('../views/Login.vue')
        },
        {
            path: '/portal',
            name:'portal',
            component: () => import('../views/Index.vue'),
            children:[
                {
                    path: '',
                    name: 'home',
                    component: () => import('../views/Home.vue')
                },
                {
                    path: '/user-list',
                    name: 'userList',
                    component: () => import('../views/UserList.vue')
                },
            ]
        },
    ],
})

export default router
